﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Universum.Model.Domain.Blogs;

namespace Universum.Model.Services.Blog
{
	public interface IBlogArticleService
	{
		/// <summary>
		/// Creates a new 
		/// </summary>
		BlogArticle Create();

		/// <summary>
		/// Gets an article based on the id
		/// </summary>
		/// <param name="id">The id of the article</param>
		/// <returns>The article</returns>
		BlogArticle GetArticleById(Guid id);

		/// <summary>
		/// Removes the article  based on it's id
		/// </summary>
		/// <param name="id">The identifier for the article</param>
		void RemoveArticleById(Guid id);
		/// <summary>
		/// Saves or updates an article
		/// </summary>
		/// <param name="article">The <c ref="Universum.Model.Domain.Blogs.BlogArticle">Article</c> to be saved</param>
		void SaveOrUpdate(BlogArticle article);
		/// <summary>
		/// Gets an article based on the article's slug
		/// </summary>
		/// <param name="slug">The article slug a.k.a. friendly URL</param>
		/// <returns></returns>
		BlogArticle GetArticleBySlug(string slug);
		/// <summary>
		/// Saves a comment to the database
		/// </summary>
		/// <param name="comment">The blog article comment</param>
		void SaveComment(BlogCommentArticle comment);
		/// <summary>
		/// Returns a list of comments based on an article id.
		/// </summary>
		/// <param name="guid">The article identifier</param>
		/// <returns>A list of comments</returns>
		IList<BlogCommentArticle> GetCommentsByArticleId(Guid guid);
	}
}
